package org.chintoooor.trio.server;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;

public class SimpleClient {
	public static void main(String[] args) {
		for (int i = 0; i < 5; i++) {
			try {
				URL url = new URL("http://localhost:8888/index.html");
				url.openConnection();
				InputStream inputStream = url.openStream();
				InputStreamReader inputStreamReader = new InputStreamReader(
						inputStream, "UTF-8");
				BufferedReader bufferredReader = new BufferedReader(
						inputStreamReader);
				String nextLine = null;
				while ((nextLine = bufferredReader.readLine()) != null) {
					System.out.println(nextLine);
				}
			} catch (Exception exception) {
				exception.printStackTrace();
			}
		}
	}
}
